home *** CD-ROM | disk | FTP | other *** search
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
- <html>
- <head>
- <title>Gestione foto di Mario Rossi</title>
- </head>
-
- <body>
-
- <h1>Elimina foto</h1>
-
- <%
-
- Dim sql
- Dim conn
- Dim i
-
- Set conn = Server.CreateObject("ADODB.Connection")
- conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & server.MapPath("/mdb-database/foto2.mdb")
-
- sql = "DELETE FROM Foto WHERE nome = '" & request.QueryString("nome") & "'"
-
- on error resume next
-
- conn.Execute sql
-
- If ConnError(conn) > 0 Then
- response.write "Si Φ verificato un problema con l'eliminazione della foto.<br>"
- response.write "Ritorna all'<a href=""gestione.asp"">elenco delle foto</a>"
- Else
- response.write "La foto Φ stata eliminata correttamente<br>"
- response.write "Ritorna all'<a href=""gestione.asp"">elenco delle foto</a>"
- End If
-
- on error goto 0
-
- set conn = nothing
-
- Function ConnError(conn)
-
- Dim i
- i = 0
-
- For Each errorObject In conn.Errors
- i = i + 1
- Response.Write "ERRORE: " & errorObject.Description & "<br><br>"
- Next
-
- ConnError = i
-
- End Function
-
- %>
-
-